package com.permissions.dispatcher.processor.exception;

import static com.permissions.dispatcher.processor.util.Extensions.simpleString;

import java.util.List;
import javax.lang.model.element.ExecutableElement;

/**
 * 重复值异常
 */
public class DuplicatedValueException extends RuntimeException {

    /**
     * 重复值异常
     */
    public DuplicatedValueException(List<String> value, ExecutableElement executableElement, Class<?> annotation) {
        super(
                value
                        + " is duplicated in '"
                        + simpleString(executableElement)
                        + "()' annotated with '@"
                        + annotation.getSimpleName()
                        + '\'');
    }
}
